home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-04-09 | 399 b | 17 lines | [TEXT/KEEN] |
- #$Files_by_Size : print name and size of input files, in order by size.
- # (largest file first)
- # Take input from: MFS selected files
- # Output is to stdout.
-
- BEGIN {
- for (i = 1; i < ARGC; ++i)
- {
- n = split(ARGV[i], names, ":")
- outnames[i] = names[n]
- sizes[i] = fsize(ARGV[i])
- }
- maxIndex = sort(sizes, ind, "rn")
- for (i = 1; i <= maxIndex; ++i)
- print outnames[ind[i]], sizes[ind[i]]
- }
-